<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function Star(uname, age, sex){
            this.uname = uname;
            this.age = age;
            this.sex = sex;
            this.sing = function(sang){
                console.log(sang);
            }
        }
        var xfy = new Star('小肥羊',23,'女');
        console.log(xfy.uname);
        xfy.sing('童话');
        var ghh = new Star('狗慧慧',25,'女');
    //    console.log(typeof xfy);查看返回值类型
        console.log(ghh);
        ghh.sing('死了都要爱');

        
        

    </script>
</head>
<body>
    
</body>
</html>